<?php 
	if (isset($this->exhibition)){
?>

<div class="focus w920">
	<div class="txt">
		<p class="left"><a href="/exhibition"><img src="<?php echo $this->exhibition->getHomeCoverWebAccessablePath();?>" alt="Online Exhibition of young artists" /></a></p>
		<p class="right"><a href="/exhibition"><b>Joined Artists:</b><br />
		<?php
			$joindArtists = $this->exhibition->getJoinedArtists();
			$names = array();
			foreach ($joindArtists as $joindArtist){
				$names[] = $joindArtist->name;
			}
			echo join(", ", $names);
		?>
		
		<br /><br />
		Curator: Serena Zhao<br />
		Date: <?php echo $this->exhibition->start_time . " - " . $this->exhibition->end_time;?>
		</a></p>
	</div>
</div>
<?php
	}
?>
<div id="content" class="w920">
	<div class="conleft">
		<div class="search">
			<form action="/artwork" id="searchform" method="get">
				<p>
					<input type="text" id="searched_content" class="box" name="keyword" />
					<input type="submit" class="button" value="Search" />
				</p>
			</form>
			<s></s>
			<ul>
				<li>Search all artworks in our site!</li>
			</ul>
		</div>
		<div class="works">
			<h2>RECOMMENDED WORKS</h2>
			<ul>
			<?php foreach ($this->artworks as $artwork) {?>
				<li onmouseover="document.getElementById('fd_<?=$artwork->id?>').style.display='block'; this.style.position='relative';"
				 onmouseout="document.getElementById('fd_<?=$artwork->id?>').style.display='none';  this.style.position='';" >
					<a class="indexthumb" href="/artwork/show?id=<?=$artwork->id?>"><img src="<?=$artwork->getPhotoWebAccessablePath('190x150')?>" alt="<?=$this->escape($artwork->name)?>" /></a>
					<span class="profudong" id="fd_<?=$artwork->id?>" style="display:none;">
							<s></s>
							<a href="/artwork/show?id=<?=$artwork->id?>"><img src="<?=$artwork->getPhotoWebAccessablePath('190x150')?>" alt="<?=$this->escape($artwork->name)?>" /></a>
							<p>
							Title: <?=$this->escape($artwork->name)?><br />
							Size: <?=$this->escape($artwork->inch_size ." / ".$artwork->size)?><br />
							Artist: <?=$this->escape($this->artistMap[$artwork->artist])?><br />
							Material: <?=$this->escape($this->categoryMap[$artwork->category])?><br />
							Price(USD): <?=$artwork->usd_price?>
							</p>
					</span>
				</li>
				<?php }?>
			</ul>
		</div>
		<div class="critics-news">
			<div class="critics">
				<h2><a href="#">ART CRITICS SAY</a></h2>
				<p><a href="/artists/show?id=<?php echo $this->artistForCriticise->id;?>"><img src="<?php echo $this->typicalArtwork ? $this->typicalArtwork->getPhotoWebAccessablePath("260x300") : "";?>" alt="#" /></a></p>
				<p class="picmenu">
				<!-- <a href="#" class="left"></a><a href="#" class="right"></a> -->
				</p>  
				<dl>
				<?php foreach ($this->criticises as $criticise){?>
					<dd><a href="/critics/reviewer?id=<?php echo $criticise->getReviewer()->id; ?>"><img src="<?php echo $criticise->getReviewer()->getPhotoWebAccessablePath("70x70");?>" alt="#" /></a></dd>
				<?php }?>
				</dl>
			</div>
			<div class="say">
			<?php foreach ($this->criticises as $criticise){?>
				<dl>
					<dt><?php echo $criticise->getReviewer()->name;?>: </dt>
					<dd><?php echo substr(strip_tags($criticise->content),0,200);?></dd>
					<dd class="more"><a href="/critics/show/id/<?php echo $criticise->id;?>" title="#">+More</a></dd>
				</dl>
			<?php }?>
			</div>
			<div class="news">
				<h2><a href="/news">NEWS</a></h2>
				<img src="/images/news_0920.jpg" />
				<?php echo $this->recommandNews->summary;?>
				<p class="more"><a href="/news/show?id=<?php echo $this->recommandNews->id;?>" title="#">+More</a></p>
			</div>
		</div>
	</div>
	<div class="conright">
		<div class="sales">
			<h2><a href="#">SALES TRENDS</a></h2>
			<ul>
				<?php foreach ($this->trends as $trend){?>
				<li><a href="/artists/show?id=<?php echo $trend->artist;?>" title="#"><?php echo $trend->getArtistObj()->name;?></a><span class="<?php echo ($trend->trends == 'U') ? "up" : "down"?>">up</span></li>
				<?php }?>
			</ul>
		</div>
		<div class="appraisal">
			<h2><a href="#">ARTIST APPRAISAL</a></h2>
			<div>
				<ul>
				<?php foreach($this->artistScores as $score){?>
				<li>
					<a href="/artists/show?id=<?php echo $score->id;?>"><img src="<?php echo $score->getPhotoWebAccessablePath("80x80");?>" alt="#" /></a>
					<dl>
						<dt><a href="/artists/show?id=<?php echo $score->id;?>" title="#"><?php echo $score->name;?></a></dt>
						<dd><span class="stars s<?php echo $score->score;?>"></span></dd>
					</dl>
				</li>
				<?php }?>
				</ul>
			</div>
		</div>
		<div class="interview">
			<h2><a href="/artists/list-interview">ARTISTS INTERVIEW</a></h2>
			<p>
				<img src="<?php echo $this->artistInterview->getPhotoWebAccessablePath("80x80");?>" alt="#" />
				<?php echo substr(strip_tags($this->artistInterview->resume),0, 300);?>
			</p>
			<p class="more"><a href="/artists/show?id=<?php echo $this->artistInterview->id;?>" title="#">+More</a></p>
		</div>
		<div class="events">
			<h2>EVENTS</h2>
			<p><a href="/index/register"><img src="/images/ad_11.jpg" alt="Sign up now!" /></a></p>
		</div>
	</div>
</div>